package test;

public class Teacher {
	 public int code; 
	 public String name; 
	 public char sex;
	 String TeachLesson;   
	    Teacher(int code, String name, char sex, String lesson) {
	        this.TeachLesson = lesson; 
	        this.name=name;
	        setName(name);  
	        }    
	    public int getCode(){ 
		     return code; 
		    } 
		    public String getName(){ 
		     return name; 
		    } 
		    public char getSex(){ 
		     return sex; 
		    } 
		    public void setCode(int code){ 
		     this.code = code; 
		    } 
		    public void setName(String name){ 
		     this.name = name; 
		    } 
		    public void setSex(char sex){ 
		     this.sex = sex; 
		    } 
		public String toString() {
	    	return "教师编号:" + getCode() + "教师姓名:"+getName()+"教师性别:"+getSex() ;
	    }  
} 